import { version } from "./version"
import type { App, Plugin } from "vue"

export const makeInstaller = (components: Plugin[] = []) => {
  const install = (app: App<Element>) => {
    // @ts-ignore
    if (app.installed) return
    // @ts-ignore
    app.installed = true
    components.forEach((c) => app.use(c))
  }
  return {
    install,
    version: version
  }
}
